#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_day_clicked()
{
    //设置整个窗口的背景是白色。
    this->setStyleSheet("background-color:rgb(240,240,240);");

    ui->plainTextEdit->setStyleSheet("color:black;");
    //设置按钮
    ui->pushButton_day->setStyleSheet("color:black;");
    ui->pushButton_night->setStyleSheet("color:black;");


}

void Widget::on_pushButton_night_clicked()
{
    //设置整个窗口的背景是白色。
    this->setStyleSheet("background-color:black;");

    ui->plainTextEdit->setStyleSheet("color:white;");
    //设置按钮
    ui->pushButton_day->setStyleSheet("color:white;");
    ui->pushButton_night->setStyleSheet("color:white;");
}
